<template>
  <div id="new">
    <div class="Box">
      <div class="container" v-for="item in list" @click="go(item)">
        <img :src="item.imgurl" alt="" />
        <div>{{ item.value }}</div>
      </div>
    </div>
  </div>
</template>

<script>
import mock from "../mock";
export default {
  data() {
    return {
      list: [],
    };
  },
  created() {
    this.getStaffData();
  },
  methods: {
    go(item) {
      //   console.log(id);
      this.$router.push({
        params: {
          item,
        },
        name: "news",
      });
    },
    getStaffData() {
      mock.getStaffData().then((res) => {
        this.list=res.data.list
      });
    },
  },
};
</script>

<style lang="less" scoped>
#new {
  height: 100%;
  background-color: #f2f5f8;
  padding-top: 40px;
  .Box {
    display: flex;
    justify-content: space-between;
    width: 1400px;
    flex-wrap: wrap;
    margin: 0 auto;
    .container:hover {
      //   border: 4px solid #4488f7;
      box-shadow: 0px 3px 6px #4488f7;
    }
    .container {
      margin-bottom: 40px;
      width: 420px;
      height: 240px;
      background: #ffffff;
      opacity: 1;
      border-radius: 0px;
      text-align: center;
      line-height: 50px;
      img {
        width: 100px;
        height: 100px;
        margin-top: 35px;
      }
      div {
        // width: 240px;
        height: 40px;
        font-size: 30px;
        font-family: Source Han Sans CN;
        font-weight: 500;
        color: #170706;
        opacity: 1;
      }
    }
  }
}
</style>
